<?php
defined('_JEXEC') or die('Restricted access');
?>

<style>
    .button2-left{
        margin: 0 0 0 5px;
    }
</style>

<form action="index.php" method="post" name="adminForm">

    <div id="elconfig-document">
        <div id="page-basic">
            
            <?php echo JHtml::_('tabs.start', 'tab_group_id', array('useCookie'=>1)); ?>
     
            <?php echo JHtml::_('tabs.panel', JText::_('GENERAL_SETTINGS'), 'panel_1'); ?>
            <fieldset class="adminform">
                <legend><?php echo JText::_(GENERAL_SETTINGS); ?></legend>
                <table class="admintable" cellspacing="1">
                    <tbody>
                        <tr>
                            <td width="300" class="key">
                                <span class="editlinktip">
                                    <?php echo JText::_(DEFAULT_CITY); ?>
                                </span>
                            </td>
                            <td valign="top">
                                <input type="text" name="default_city" value="<?php echo $this->elsettings->default_city; ?>" size="15" />
                            </td>
                        </tr>
                        <tr>
                            <td width="300" class="key">
                                <span class="editlinktip">
                                    <?php echo JText::_(DEFAULT_COUNTRY); ?>
                                </span>
                            </td>
                            <td valign="top">
                                <input type="text" name="default_country" value="<?php echo $this->elsettings->default_country; ?>" size="15" />
                            </td>
                        </tr>
                        <tr>
                            <td width="300" class="key" style="vertical-align: top;">
                                <span class="editlinktip">
                                    <?php echo JText::_(UNIT_DISTANCE); ?>
                                </span>
                            </td>
                            <td valign="top">
                                <?php
                                $showdets = array();
                                $showdets[] = JHTML::_('select.option', 'mile', JText::_(MILE));
                                $showdets[] = JHTML::_('select.option', 'kM', JText::_(KILOMETER));
                                echo JHTML::_('select.genericlist', $showdets, 'distance_unit', 'size="1" class="inputbox"', 'value', 'text', $this->elsettings->distance_unit);
                                ?>
                            </td>
                        </tr>

                        <tr>
                            <td width="300" class="key" style="vertical-align: top;">
                                <span class="editlinktip">
                                    <?php echo JText::_(CURRENCY); ?>
                                </span>
                            </td>
                            <td valign="top">
                                <?php
                                echo $this->lists['currency'];
                                ?>
                            </td>
                        </tr>
                        <tr>
                            <td width="300" class="key">
                                <span class="editlinktip">
                                    <?php echo JText::_(CURRENCY_SYMBOL); ?>
                                </span>
                            </td>
                            <td valign="top">
                                <input type="text" name="currency_symbol" value="<?php echo htmlspecialchars($this->elsettings->currency_symbol); ?>" size="15" maxlength="15" />
                            </td>
                        </tr>
                        <tr>
                            <td width="300" class="key">
                                <span class="editlinktip">
                                    <?php echo JText::_(DISCOUNT); ?>
                                </span>
                            </td>
                            <td valign="top">
                                <input type="text" name="discount" value="<?php echo $this->elsettings->discount; ?>" size="15" maxlength="15" />
                            </td>
                        </tr>
                        <tr>
                            <td width="300" class="key">
                                <span class="editlinktip">
                                    <?php echo JText::_(SURCHARGE_DATES); ?>
                                </span>
                            </td>
                            <td valign="top">
                                <input type="text" name="surcharge_by_dates" value="<?php echo $this->elsettings->surcharge_by_dates; ?>" size="50"  />
                            </td>
                        </tr>
                        <tr>
                            <td width="300" class="key">
                                <span class="editlinktip">
                                    <?php echo JText::_(RESTRICT_TIME); ?>
                                </span>
                            </td>
                            <td valign="top">
                                <input type="text" name="restrict_time" id="restrict_time" value="<?php echo $this->elsettings->restrict_time ?>">

                            </td>
                        </tr>
                    </tbody>
                </table>
            </fieldset>
            
            <?php echo JHtml::_('tabs.panel', JText::_('PAYMENT_SETTINGS'), 'panel_2'); ?>
            
            <fieldset class="adminform">
                <legend><?php echo JText::_(PAYMENT_SETTINGS); ?></legend>

                <fieldset class="adminform">
                    <legend><?php echo JText::_(PAYPAL_SETTINGS); ?></legend>
                    <table class="admintable" cellspacing="1">
                        <tbody>
                            <tr>
                                <td width="300" class="key">
                                    <span class="editlinktip">
                                        <?php echo JText::_(ENABLE); ?>
                                    </span>
                                </td>
                                <td valign="top">
                                    <?php
                                    $showdets = array();
                                    $showdets[] = JHTML::_('select.option', 1, JText::_(YES));
                                    $showdets[] = JHTML::_('select.option', 0, JText::_(NO));
                                    echo JHTML::_('select.genericlist', $showdets, 'paypal_enabled', 'size="1" class="inputbox"', 'value', 'text', $this->elsettings->paypal_enabled);
                                    ?>
                                </td>
                            </tr>
                            <tr>
                                <td width="300" class="key">
                                    <span class="editlinktip">
                                        <?php echo JText::_(TEST_MODE); ?>
                                    </span>
                                </td>
                                <td valign="top">
                                    <?php
                                    $showdets = array();
                                    $showdets[] = JHTML::_('select.option', 1, JText::_(YES));
                                    $showdets[] = JHTML::_('select.option', 0, JText::_(NO));
                                    echo JHTML::_('select.genericlist', $showdets, 'paypal_test_mode', 'size="1" class="inputbox"', 'value', 'text', $this->elsettings->paypal_test_mode);
                                    ?>
                                </td>
                            </tr>
                            <tr>
                                <td width="300" class="key">
                                    <span class="editlinktip">
                                        <?php echo JText::_(PAYPAL_EMAIL); ?>
                                    </span>
                                </td>
                                <td valign="top">
                                    <input type="text" name="paypal_email" value="<?php echo $this->elsettings->paypal_email; ?>" size="25" />
                                </td>
                            </tr>
                        </tbody>
                    </table>
                </fieldset>


                <fieldset class="adminform">
                    <legend><?php echo JText::_(NCIPAY_SETTINGS); ?></legend>
                    <table class="admintable" cellspacing="1">
                        <tbody>
                            <tr>
                                <td width="300" class="key">
                                    <span class="editlinktip">
                                        <?php echo JText::_(ENABLE); ?>
                                    </span>
                                </td>
                                <td valign="top">
                                    <?php
                                    $showdets = array();
                                    $showdets[] = JHTML::_('select.option', 1, JText::_(YES));
                                    $showdets[] = JHTML::_('select.option', 0, JText::_(NO));
                                    echo JHTML::_('select.genericlist', $showdets, 'ncipay_enabled', 'size="1" class="inputbox"', 'value', 'text', $this->elsettings->ncipay_enabled);
                                    ?>
                                </td>
                            </tr>
                            <tr>
                                <td width="300" class="key">
                                    <span class="editlinktip">
                                        <?php echo JText::_(NCIPAY_MERCHANT_ID); ?>
                                    </span>
                                </td>
                                <td valign="top">
                                    <input type="text" name="ncipay_merchant_id" value="<?php echo $this->elsettings->ncipay_merchant_id; ?>" size="25" />
                                </td>
                            </tr>
                            <tr>
                                <td width="300" class="key">
                                    <span class="editlinktip">
                                        <?php echo JText::_(NCIPAY_CURRENCY); ?>
                                    </span>
                                </td>
                                <td valign="top">
                                    <input type="text" name="ncipay_currency" value="<?php echo $this->elsettings->ncipay_currency; ?>" size="25" />
                                </td>
                            </tr>
                            <tr>
                                <td width="300" class="key">
                                    <span class="editlinktip">
                                        <?php echo JText::_(NCIPAY_LANGUAGE); ?>
                                    </span>
                                </td>
                                <td valign="top">
                                    <input type="text" name="ncipay_language" value="<?php echo $this->elsettings->ncipay_language; ?>" size="25" />
                                </td>
                            </tr>
                            <tr>
                                <td width="300" class="key">
                                    <span class="editlinktip">
                                        <?php echo JText::_(NCIPAY_SECRET_KEY); ?>
                                    </span>
                                </td>
                                <td valign="top">
                                    <input type="text" name="ncipay_secret_key" value="<?php echo $this->elsettings->ncipay_secret_key; ?>" size="25" />
                                </td>
                            </tr>
                        </tbody>
                    </table>
                </fieldset>
                <fieldset class="adminform">
                    <legend><?php echo JText::_(AUTHNET_SETTINGS); ?></legend>
                    <table class="admintable" cellspacing="1">
                        <tbody>
                            <tr>
                                <td width="300" class="key">
                                    <span class="editlinktip">
                                        <?php echo JText::_(ENABLE); ?>
                                    </span>
                                </td>
                                <td valign="top">
                                    <?php
                                    $showdets = array();
                                    $showdets[] = JHTML::_('select.option', 1, JText::_(YES));
                                    $showdets[] = JHTML::_('select.option', 0, JText::_(NO));
                                    echo JHTML::_('select.genericlist', $showdets, 'auth_enabled', 'size="1" class="inputbox"', 'value', 'text', $this->elsettings->auth_enabled);
                                    ?>
                                </td>
                            </tr>
                            <tr>
                                <td width="300" class="key">
                                    <span class="editlinktip">
                                        <?php echo JText::_(TESTMODE); ?>
                                    </span>
                                </td>
                                <td valign="top">
                                    <?php
                                    $showdets = array();
                                    $showdets[] = JHTML::_('select.option', 1, JText::_(YES));
                                    $showdets[] = JHTML::_('select.option', 0, JText::_(NO));
                                    echo JHTML::_('select.genericlist', $showdets, 'auth_test_mode', 'size="1" class="inputbox"', 'value', 'text', $this->elsettings->auth_test_mode);
                                    ?>
                                </td>
                            </tr>
                            <tr>
                                <td width="300" class="key">
                                    <span class="editlinktip">
                                        <?php echo JText::_(AUTH_API_LOGIN_ID); ?>
                                    </span>
                                </td>
                                <td valign="top">
                                    <input type="text" name="auth_api_login_id" value="<?php echo $this->elsettings->auth_api_login_id; ?>" size="25" />
                                </td>
                            </tr>

                            <tr>
                                <td width="300" class="key">
                                    <span class="editlinktip">
                                        <?php echo JText::_(AUTH_TRANS_ID); ?>
                                    </span>
                                </td>
                                <td valign="top">
                                    <input type="text" name="auth_transcaction_key" value="<?php echo $this->elsettings->auth_transcaction_key; ?>" size="25" />
                                </td>
                            </tr>

                        </tbody>
                    </table>
                </fieldset>
                <fieldset class="adminform">
                    <legend><?php echo JText::_(CASH_SETTINGS); ?></legend>
                    <table class="admintable" cellspacing="1">
                        <tbody>
                            <tr>
                                <td width="300" class="key">
                                    <span class="editlinktip">
                                        <?php echo JText::_(ENABLE); ?>
                                    </span>
                                </td>
                                <td valign="top">
                                    <?php
                                    $showdets = array();
                                    $showdets[] = JHTML::_('select.option', 1, JText::_(YES));
                                    $showdets[] = JHTML::_('select.option', 0, JText::_(NO));
                                    echo JHTML::_('select.genericlist', $showdets, 'cash_enabled', 'size="1" class="inputbox"', 'value', 'text', $this->elsettings->cash_enabled);
                                    ?>
                                </td>
                            </tr>
                        </tbody>
                    </table>
                </fieldset>

            </fieldset>
            
            
            <?php echo JHtml::_('tabs.panel', JText::_('PRICE_SETTINGS'), 'panel_3'); ?>
            <fieldset class="adminform">
                <legend><?php echo JText::_(PRICE_SETTINGS); ?></legend>
                <table class="admintable" cellspacing="1">
                    <tbody>

                        <tr>
                            <td width="300" class="key">
                                <span class="editlinktip">
                                    <?php echo JText::_(PRICE_PER_UNIT_DISTANCE); ?>
                                </span>
                            </td>
                            <td valign="top">
                                <input type="text" name="price_per_unit_distance" value="<?php echo $this->elsettings->price_per_unit_distance; ?>" size="15" maxlength="15" />
                            </td>
                        </tr>

                        <tr>
                            <td width="300" class="key">
                                <span class="editlinktip">
                                    <?php echo JText::_(MPV_PRICE); ?>
                                </span>
                            </td>
                            <td valign="top">
                                <input type="text" name="mpv_price" value="<?php echo $this->elsettings->mpv_price; ?>" size="15" maxlength="15" />
                            </td>
                        </tr>
                        <tr>
                            <td width="300" class="key">
                                <span class="editlinktip">
                                    <?php echo JText::_(EIGHTSEAT_PRICE); ?>
                                </span>
                            </td>
                            <td valign="top">
                                <input type="text" name="seat8_price" value="<?php echo $this->elsettings->seat8_price; ?>" size="15" maxlength="15" />
                            </td>
                        </tr>
                        <tr>
                            <td width="300" class="key">
                                <span class="editlinktip">
                                    <?php echo JText::_(INFANT_PRICE); ?>
                                </span>
                            </td>
                            <td valign="top">
                                <input type="text" name="infant_seat_price" value="<?php echo $this->elsettings->infant_seat_price; ?>" size="15" maxlength="15" />
                            </td>
                        </tr>
                        <tr>
                            <td width="300" class="key">
                                <span class="editlinktip">
                                    <?php echo JText::_(CHILD_PRICE); ?>
                                </span>
                            </td>
                            <td valign="top">
                                <input type="text" name="child_seat_price" value="<?php echo $this->elsettings->child_seat_price; ?>" size="15" maxlength="15" />
                            </td>
                        </tr>
                        <tr>
                            <td width="300" class="key">
                                <span class="editlinktip">
                                    <?php echo JText::_(BOOSTER_PRICE); ?>
                                </span>
                            </td>
                            <td valign="top">
                                <input type="text" name="booster_seat_price" value="<?php echo $this->elsettings->booster_seat_price; ?>" size="15" maxlength="15" />
                            </td>
                        </tr>
                        <tr>
                            <td width="300" class="key">
                                <span class="editlinktip">
                                    <?php echo JText::_(COST_PER_CALL); ?>
                                </span>
                            </td>
                            <td valign="top">
                                <input type="text" name="cost_per_call" value="<?php echo $this->elsettings->cost_per_call; ?>" size="15" maxlength="15" />
                            </td>
                        </tr>
                        <tr>
                            <td width="300" class="key">
                                <span class="editlinktip">
                                    <?php echo JText::_(PREPAYMENT); ?>
                                </span>
                            </td>
                            <td valign="top">
                                <input type="text" name="prepayment" value="<?php echo $this->elsettings->prepayment; ?>" size="15" maxlength="15" />
                            </td>
                        </tr>
                        <tr>
                            <td width="300" class="key">
                                <span class="editlinktip">
                                    <?php echo JText::_(MIN_DISTANCE); ?>
                                </span>
                            </td>
                            <td valign="top">
                                <input type="text" name="minmil" value="<?php echo $this->elsettings->minmil; ?>" size="15" maxlength="15" />
                            </td>
                        </tr>
                        <tr>
                            <td width="300" class="key">
                                <span class="editlinktip">
                                    <?php echo JText::_(MIN_DIST_PRICE); ?>
                                </span>
                            </td>
                            <td valign="top">
                                <input type="text" name="minprice" value="<?php echo $this->elsettings->minprice; ?>" size="15" maxlength="15" />
                            </td>
                        </tr>
                        <tr>
                            <td width="300" class="key">
                                <span class="editlinktip">
                                    <?php echo JText::_(PICKUP_CHARGE); ?>
                                </span>
                            </td>
                            <td valign="top">
                                <input type="text" name="pick_up_charge" value="<?php echo $this->elsettings->pick_up_charge; ?>" size="15" maxlength="15" />
                            </td>
                        </tr>
                    </tbody>
                </table>
            </fieldset>
            
            <?php echo JHtml::_('tabs.panel', JText::_('MAP_SETTINGS'), 'panel_4'); ?>
            <fieldset class="adminform">
                <legend><?php echo JText::_(MAP_SETTINGS); ?></legend>
                <table class="admintable" cellspacing="1">
                    <tbody>
                        <tr>
                            <td width="300" class="key">
                                <span class="editlinktip">
                                    <?php echo JText::_(MAP_WIDTH); ?>
                                </span>
                            </td>
                            <td valign="top">
                                <input type="text" name="map_width" value="<?php echo $this->elsettings->map_width; ?>" size="15" maxlength="15" /> px
                            </td>
                        </tr>
                        <tr>
                            <td width="300" class="key">
                                <span class="editlinktip">
                                    <?php echo JText::_(MAP_HEIGHT); ?>
                                </span>
                            </td>
                            <td valign="top">
                                <input type="text" name="map_height" value="<?php echo $this->elsettings->map_height; ?>" size="15" maxlength="15" /> px
                            </td>
                        </tr>
                        <tr>
                            <td width="300" class="key">
                                <span class="editlinktip">
                                    <?php echo JText::_(MAP_ZOOM_LEVEL); ?>
                                </span>
                            </td>
                            <td valign="top">
                                <input type="text" name="map_zoom" value="<?php echo $this->elsettings->map_zoom; ?>" size="15" maxlength="15" />
                            </td>
                        </tr>
                        <tr>
                            <td width="300" class="key">
                                <span class="editlinktip">
                                    <?php echo JText::_(DIRECTION_WIDTH); ?>
                                </span>
                            </td>
                            <td valign="top">
                                <input type="text" name="dir_width" value="<?php echo $this->elsettings->dir_width; ?>" size="15" maxlength="15" /> px
                            </td>
                        </tr>
                        <tr>
                            <td width="300" class="key">
                                <span class="editlinktip">
                                    <?php echo JText::_(DIRECTION_HEIGHT); ?>
                                </span>
                            </td>
                            <td valign="top">
                                <input type="text" name="dir_height" value="<?php echo $this->elsettings->dir_height; ?>" size="15" maxlength="15" /> px
                            </td>
                        </tr>
                        <tr>
                            <td width="300" class="key" style="vertical-align: top;">
                                <span class="editlinktip">
                                    <?php echo JText::_(MAP_ON_RIGHT); ?>
                                </span>
                            </td>
                            <td valign="top">
                                <?php
                                $showdets = array();
                                $showdets[] = JHTML::_('select.option', 0, JText::_(NO));
                                $showdets[] = JHTML::_('select.option', 1, JText::_(YES));
                                echo JHTML::_('select.genericlist', $showdets, 'map_on_right', 'size="1" class="inputbox"', 'value', 'text', $this->elsettings->map_on_right);
                                ?>
                            </td>
                        </tr>
                        <tr>
                            <td width="300" class="key" style="vertical-align: top;">
                                <span class="editlinktip">
                                    <?php echo JText::_(MAP_ACTIVE); ?>
                                </span>
                            </td>
                            <td valign="top">
                                <select name="map_active">
                                    <option value="1" <?php echo ($this->elsettings->map_active == 1) ? 'selected' : ''; ?>>Yes</option>
                                    <option value="0" <?php echo ($this->elsettings->map_active == 0) ? 'selected' : ''; ?>>No</option>

                                </select>
                            </td>
                        </tr>
                    </tbody>
                </table>
            </fieldset>

            <?php echo JHtml::_('tabs.panel', JText::_('EMAIL_SETTINGS'), 'panel_5'); ?>
            <fieldset class="adminform">
                <legend><?php echo JText::_('EMAIL_SETTINGS'); ?></legend>
                
                <fieldset class="adminform">
                    <legend><?php echo JText::_('EMAIL_HEADER_LOGO'); ?></legend>
                     <table>
                         <tr>
                             <td style="text-align:left">
                                    <?php echo $this->imageselect; ?>

                                    <img src="../images/M_images/blank.png" name="imagelib" id="imagelib" width="80" height="80" border="2" alt="Preview" />
                                    <script language="javascript" type="text/javascript">
                                        if (document.forms[0].a_imagename.value!=''){
                                            var imname = document.forms[0].a_imagename.value;
                                            jsimg='../images/stories/taxibooking/' + imname;
                                            document.getElementById('imagelib').src= jsimg;
                                        }
                                    </script>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <?php echo JText::_(UPLOAD_LOGO_SAVE_SETTINGS); ?><br/>
                                    <?php echo JText::_(SELECT_IMAGE_NEXT) ?><br/>
                                    <?php echo JText::_(CLICK_UPLOAD_THEN_DELETE); ?>
                                </td>
                            </tr>
                       </table> 
                </fieldset>
                
                <fieldset class="adminform">
                    <legend><?php echo JText::_('EMAIL_HEADER_INFO'); ?></legend>
                    
                    <table cellspacing="0" cellpadding="0" border="0" width="100%" style="padding:10px">
                    <tbody>
                        <tr>
                            <td valign="top" width="60%">
                                <?php
                                // parameters : areaname, content, hidden field, width, height, rows, cols
                                echo $this->editor->display('header_info', $this->elsettings->header_info, '100%', '300', '75', '20');
                                ?>
                            </td>
                        </tr>
                    </tbody>
                </table>
                
                </fieldset>
                
                <fieldset class="adminform">
                    <legend><?php echo JText::_('CONTACT_INFO'); ?></legend>
                    
                    <table cellspacing="0" cellpadding="0" border="0" width="100%" style="padding:10px">
                    <tbody>
                        <tr>
                            <td valign="top" width="60%">
                                <?php
                                // parameters : areaname, content, hidden field, width, height, rows, cols
                                echo $this->editor->display('contact_info', $this->elsettings->contact_info, '100%', '300', '75', '20');
                                ?>
                            </td>
                        </tr>
                    </tbody>
                </table>
                
                </fieldset>
            </fieldset>
            
            <?php echo JHtml::_('tabs.end'); ?>
         </div>
    </div>
    <div class="clr"></div>

    <?php echo JHTML::_('form.token'); ?>
    <input type="hidden" name="task" value="">
    <input type="hidden" name="id" value="1">
    <input type="hidden" name="lastupdate" value="<?php echo $this->elsettings->lastupdate; ?>">
    <input type="hidden" name="option" value="com_taxibooking">
    <input type="hidden" name="controller" value="settings">
</form>